package com.dstz.bpm.core.model;

import com.dstz.base.api.model.IDModel;
import com.dstz.bpm.api.engine.action.cmd.ActionCmd;
import com.dstz.bpm.api.model.inst.BpmExecutionStack;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;

public class BpmTaskStack implements IDModel, BpmExecutionStack {
   protected String id;
   protected String taskId;
   protected String v;
   protected String parentId;
   protected String nodeId;
   protected String nodeName;
   protected Date startTime;
   protected Date endTime;
   protected Short ap;
   protected String aq;
   protected String actionName;

   public void setId(String id) {
      this.id = id;
   }

   public String getId() {
      return this.id;
   }

   public void setTaskId(String taskId) {
      this.taskId = taskId;
   }

   public String getTaskId() {
      return this.taskId;
   }

   public void setInstId(String instId) {
      this.v = instId;
   }

   public String getInstId() {
      return this.v;
   }

   public void setParentId(String parentId) {
      this.parentId = parentId;
   }

   public String getParentId() {
      return this.parentId;
   }

   public void setNodeId(String nodeId) {
      this.nodeId = nodeId;
   }

   public String getNodeId() {
      return this.nodeId;
   }

   public void setNodeName(String nodeName) {
      this.nodeName = nodeName;
   }

   public String getNodeName() {
      return this.nodeName;
   }

   public void setStartTime(Date startTime) {
      this.startTime = startTime;
   }

   public Date getStartTime() {
      return this.startTime;
   }

   public void setEndTime(Date endTime) {
      this.endTime = endTime;
   }

   public Date getEndTime() {
      return this.endTime;
   }

   public void setIsMulitiTask(Short isMulitiTask) {
      this.ap = isMulitiTask;
   }

   public Short getIsMulitiTask() {
      return this.ap;
   }

   public String getActionName() {
      return this.actionName;
   }

   public void setActionName(String actionName) {
      this.actionName = actionName;
   }

   public String toString() {
      return (new ToStringBuilder(this)).append("id", this.id).append("taskId", this.taskId).append("instId", this.v).append("parentId", this.parentId).append("nodeId", this.nodeId).append("nodeName", this.nodeName).append("startTime", this.startTime).append("endTime", this.endTime).append("isMulitiTask", this.ap).append("nodeTYpe", this.aq).toString();
   }

   public void setNodeType(String nodeType) {
      this.aq = nodeType;
   }

   public String getNodeType() {
      return this.aq;
   }

   public void setActionName(ActionCmd actionModel) {
      if (actionModel != null) {
         this.setActionName(actionModel.getActionName());
      }

   }
}
